package net.esj.basic.plugins.freemarker.templatemodel;

import java.util.List;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import net.esj.basic.utils.view.HtmlUtils;
import freemarker.template.TemplateMethodModel;
import freemarker.template.TemplateModelException;

@Component("formateTextareaTemplateMethodModel")
@Scope("prototype")
public class FormateTextareaTemplateMethodModel implements TemplateMethodModel {

	@Override
	public Object exec(List arg0) throws TemplateModelException {
		String o = (String) arg0.get(0);
		o = HtmlUtils.formateTextarea(o);
		return o;
	}

}
